// CodeGear C++Builder
// Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'libavfilter.pas' rev: 30.00 (Windows)

#ifndef LibavfilterHPP
#define LibavfilterHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <ffmpeg_types.hpp>
#include <libavutil.hpp>
#include <libavformat.hpp>

//-- user supplied -----------------------------------------------------------

namespace Libavfilter
{
//-- forward type declarations -----------------------------------------------
struct DECLSPEC_DRECORD AVFilterPad
{
};


struct DECLSPEC_DRECORD AVFilterCommand
{
};


struct AVFilter;
struct DECLSPEC_DRECORD AVFilterInternal
{
};


struct AVFilterContext;
struct DECLSPEC_DRECORD AVFilterGraphInternal
{
};


struct AVFilterGraph;
struct AVFilterLink;
struct AVFilterInOut;
struct AVBufferSinkParams;
struct AVABufferSinkParams;
struct AVBufferSrcParameters;
//-- type declarations -------------------------------------------------------
typedef AVFilterContext *pAVFilterContext;

typedef pAVFilterContext *ppAVFilterContext;

typedef AVFilterLink *pAVFilterLink;

typedef pAVFilterLink *ppAVFilterLink;

typedef AVFilterPad *pAVFilterPad;

typedef AVFilterGraph *pAVFilterGraph;

typedef AVFilterCommand *pAVFilterCommand;

typedef AVFilter *pAVFilter;

struct DECLSPEC_DRECORD AVFilter
{
public:
	char *name;
	char *description;
	AVFilterPad *inputs;
	AVFilterPad *outputs;
	Libavutil::avclass *priv_class;
	int flags;
	int __cdecl (*preinit)(pAVFilterContext ctx);
	int __cdecl (*init)(pAVFilterContext ctx);
	int __cdecl (*init_dict)(pAVFilterContext ctx, Libavutil::pAVDictionary &options);
	void __cdecl (*uninit)(pAVFilterContext ctx);
	int __cdecl (*query_formats)(pAVFilterContext p);
	int priv_size;
	int flags_internal;
	AVFilter *next;
	int __cdecl (*process_command)(pAVFilterContext ctx, const char * cmd, const char * arg, char * res, int res_len, int flags);
	int __cdecl (*init_opaque)(pAVFilterContext ctx, void * opaque);
	int __cdecl (*activate)(pAVFilterContext ctx);
};


typedef AVFilterInternal *pAVFilterInternal;

struct DECLSPEC_DRECORD AVFilterContext
{
public:
	Libavutil::avclass *av_class;
	AVFilter *filter;
	char *name;
	AVFilterPad *input_pads;
	pAVFilterLink *inputs;
	unsigned nb_inputs;
	AVFilterPad *output_pads;
	pAVFilterLink *outputs;
	unsigned nb_outputs;
	void *priv;
	AVFilterGraph *graph;
	int thread_type;
	AVFilterInternal *internal;
	AVFilterCommand *command_queue;
	char *enable_str;
	void *enable;
	double *var_values;
	int is_disabled;
	Libavutil::AVBufferRef *hw_device_ctx;
	int nb_threads;
	unsigned ready;
	int extra_hw_frames;
};


typedef AVFilterGraphInternal *pAVFilterGraphInternal;

typedef int __cdecl (*Tavfilter_action_func)(pAVFilterContext ctx, void * arg, int jobnr, int b_jobs);

typedef int __cdecl (*Tavfilter_execute_func)(pAVFilterContext ctx, Tavfilter_action_func func, void * arg, int &ret, int nb_jobs);

struct DECLSPEC_DRECORD AVFilterGraph
{
public:
	Libavutil::avclass *av_class;
	pAVFilterContext *filters;
	unsigned nb_filters;
	char *scale_sws_opts;
	char *resample_lavr_opts _DEPRECATED_ATTRIBUTE0 ;
	int thread_type;
	int nb_threads;
	AVFilterGraphInternal *internal;
	void *opaque;
	Tavfilter_execute_func execute;
	char *aresample_swr_opts;
	pAVFilterLink *sink_links;
	int sink_links_count;
	unsigned disable_auto_convert;
};


enum DECLSPEC_DENUM Tinit_state : unsigned int { AVLINK_UNINIT, AVLINK_STARTINIT, AVLINK_INIT };

struct DECLSPEC_DRECORD AVFilterLink
{
public:
	AVFilterContext *src;
	AVFilterPad *srcpad;
	AVFilterContext *dst;
	AVFilterPad *dstpad;
	Libavutil::AVMediaType _type;
	int w;
	int h;
	Libavutil::AVRational sample_aspect_ratio;
	unsigned __int64 channel_layout;
	int sample_rate;
	int format;
	Libavutil::AVRational time_base;
	Libavformat::AVFilterFormats *in_formats;
	Libavformat::AVFilterFormats *out_formats;
	Libavformat::AVFilterFormats *in_samplerates;
	Libavformat::AVFilterFormats *out_samplerates;
	Libavformat::AVFilterChannelLayouts *in_channel_layouts;
	Libavformat::AVFilterChannelLayouts *out_channel_layouts;
	int request_samples;
	Tinit_state init_state;
	AVFilterGraph *graph;
	__int64 current_pts;
	__int64 current_pts_us;
	int age_index;
	Libavutil::AVRational frame_rate;
	Libavutil::AVFrame *partial_buf;
	int partial_buf_size;
	int min_samples;
	int max_samples;
	int channels;
	unsigned flags;
	__int64 frame_count_in;
	__int64 frame_count_out;
	void *frame_pool;
	int frame_wanted_out;
	Libavutil::AVBufferRef *hw_frames_ctx;
	Libavutil::FFFrameQueue fifo;
	int frame_blocked_in;
	int status_in;
	__int64 status_in_pts;
	int status_out;
};


typedef AVFilterInOut *pAVFilterInOut;

struct DECLSPEC_DRECORD AVFilterInOut
{
public:
	char *name;
	AVFilterContext *filter_ctx;
	int pad_idx;
	AVFilterInOut *next;
};


typedef AVBufferSinkParams *pAVBufferSinkParams;

struct DECLSPEC_DRECORD AVBufferSinkParams
{
public:
	Libavutil::AVPixelFormat *pixel_fmts;
};


typedef AVABufferSinkParams *pAVABufferSinkParams;

struct DECLSPEC_DRECORD AVABufferSinkParams
{
public:
	Libavutil::AVSampleFormat *sample_fmts;
	__int64 *channel_layouts;
	int *channel_counts;
	int all_channel_counts;
	int *sample_rates;
};


typedef AVBufferSrcParameters *pAVBufferSrcParameters;

struct DECLSPEC_DRECORD AVBufferSrcParameters
{
public:
	int format;
	Libavutil::AVRational time_base;
	int width;
	int height;
	Libavutil::AVRational sample_aspect_ratio;
	Libavutil::AVRational frame_rate;
	Libavutil::AVBufferRef *hw_frames_ctx;
	int sample_rate;
	unsigned __int64 channel_layout;
};


//-- var, const, procedure ---------------------------------------------------
static const System::Int8 LIBAVUTIL_VERSION_MAJOR = System::Int8(0x38);
#define LIBAVUTIL_VERSION_MAJOR_STR L"56"
static const System::Int8 LIBAVUTIL_VERSION_MINOR = System::Int8(0x1f);
static const System::Int8 LIBAVUTIL_VERSION_MICRO = System::Int8(0x64);
#define FFMPEG_VERSION L"4.2.2"
static const int LIBAVUTIL_VERSION_INT = int(0x381f64);
static const System::Int8 LIBSWSCALE_VERSION_MAJOR = System::Int8(0x5);
static const System::WideChar LIBSWSCALE_VERSION_MAJOR_STR = (System::WideChar)(0x35);
static const System::Int8 LIBSWSCALE_VERSION_MINOR = System::Int8(0x5);
static const System::Int8 LIBSWSCALE_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 LIBAVCODEC_VERSION_MAJOR = System::Int8(0x3a);
#define LIBAVCODEC_VERSION_MAJOR_STR L"58"
static const System::Int8 LIBAVCODEC_VERSION_MINOR = System::Int8(0x36);
static const System::Int8 LIBAVCODEC_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 LIBAVDEVICE_VERSION_MAJOR = System::Int8(0x3a);
#define LIBAVDEVICE_VERSION_MAJOR_STR L"58"
static const System::Int8 LIBAVDEVICE_VERSION_MINOR = System::Int8(0x8);
static const System::Int8 LIBAVDEVICE_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 LIBAVFORMAT_VERSION_MAJOR = System::Int8(0x3a);
#define LIBAVFORMAT_VERSION_MAJOR_STR L"58"
static const System::Int8 LIBAVFORMAT_VERSION_MINOR = System::Int8(0x1d);
static const System::Int8 LIBAVFORMAT_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 FF_API_R_FRAME_RATE = System::Int8(0x1);
static const System::Int8 LIBPOSTPROC_VERSION_MAJOR = System::Int8(0x37);
#define LIBPOSTPROC_VERSION_MAJOR_STR L"55"
static const System::Int8 LIBPOSTPROC_VERSION_MINOR = System::Int8(0x5);
static const System::Int8 LIBPOSTPROC_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 LIBSWRESAMPLE_VERSION_MAJOR = System::Int8(0x3);
static const System::WideChar LIBSWRESAMPLE_VERSION_MAJOR_STR = (System::WideChar)(0x33);
static const System::Int8 LIBSWRESAMPLE_VERSION_MINOR = System::Int8(0x5);
static const System::Int8 LIBSWRESAMPLE_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 LIBAVFILTER_VERSION_MAJOR = System::Int8(0x7);
static const System::WideChar LIBAVFILTER_VERSION_MAJOR_STR = (System::WideChar)(0x37);
static const System::Int8 LIBAVFILTER_VERSION_MINOR = System::Int8(0x39);
static const System::Int8 LIBAVFILTER_VERSION_MICRO = System::Int8(0x64);
#define swscale_dll L"swscale-5.dll"
#define avutil_dll L"avutil-56.dll"
#define avcodec_dll L"avcodec-58.dll"
#define avdevice_dll L"avdevice-58.dll"
#define avformat_dll L"avformat-58.dll"
#define postproc_dll L"postproc-55.dll"
#define swresample_dll L"swresample-3.dll"
#define avfilter_dll L"avfilter-7.dll"
extern "C" unsigned __cdecl avfilter_version(void);
extern "C" char * __cdecl avfilter_configuration(void);
extern "C" char * __cdecl avfilter_license(void);
static const System::Int8 AVFILTER_THREAD_SLICE = System::Int8(0x1);
static const System::Int8 AVFILTER_FLAG_DYNAMIC_INPUTS = System::Int8(0x1);
static const System::Int8 AVFILTER_FLAG_DYNAMIC_OUTPUTS = System::Int8(0x2);
static const System::Int8 AVFILTER_FLAG_SLICE_THREADS = System::Int8(0x4);
static const int AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC = int(0x10000);
static const int AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL = int(0x20000);
static const int AVFILTER_FLAG_SUPPORT_TIMELINE = int(0x30000);
extern "C" int __cdecl avfilter_link(pAVFilterContext src, unsigned srcpad, pAVFilterContext dst, unsigned dstpad);
extern "C" void __cdecl avfilter_link_free(pAVFilterLink &link);
extern "C" int __cdecl avfilter_link_get_channels _DEPRECATED_ATTRIBUTE1("Use av_buffersink_get_channels()") (pAVFilterLink link);
extern "C" void __cdecl avfilter_link_set_closed _DEPRECATED_ATTRIBUTE1("applications are not supposed to mess with links, they should close the sinks.") (pAVFilterLink link, int closed);
extern "C" int __cdecl avfilter_config_links(pAVFilterContext filter);
static const System::Int8 AVFILTER_CMD_FLAG_ONE = System::Int8(0x1);
static const System::Int8 AVFILTER_CMD_FLAG_FAST = System::Int8(0x2);
extern "C" int __cdecl avfilter_process_command(pAVFilterContext filter, const char * cmd, const char * arg, char * res, int res_len, int flags);
extern "C" pAVFilter __cdecl av_filter_iterate(void * &opaque);
extern "C" void __cdecl avfilter_register_all _DEPRECATED_ATTRIBUTE0 (void);
extern "C" int __cdecl avfilter_register _DEPRECATED_ATTRIBUTE0 (pAVFilter filter);
extern "C" pAVFilter __cdecl avfilter_next _DEPRECATED_ATTRIBUTE0 (const pAVFilter prev);
extern "C" pAVFilter __cdecl avfilter_get_by_name(const char * name);
extern "C" int __cdecl avfilter_init_str(pAVFilterContext ctx, const char * args);
extern "C" int __cdecl avfilter_init_dict(pAVFilterContext ctx, Libavutil::pAVDictionary &options);
extern "C" void __cdecl avfilter_free(pAVFilterContext filter);
extern "C" int __cdecl avfilter_insert_filter(pAVFilterLink link, pAVFilterContext filt, unsigned filt_srcpad_idx, unsigned filt_dstpad_idx);
extern "C" Libavutil::pAVClass __cdecl avfilter_get_class(void);
extern "C" pAVFilterGraph __cdecl avfilter_graph_alloc(void);
extern "C" pAVFilterContext __cdecl avfilter_graph_alloc_filter(pAVFilterGraph graph, const pAVFilter filter, const char * name);
extern "C" pAVFilterContext __cdecl avfilter_graph_get_filter(pAVFilterGraph graph, const char * name);
extern "C" int __cdecl avfilter_graph_create_filter(pAVFilterContext &filt_ctx, const pAVFilter filt, const char * name, const char * args, void * opaque, pAVFilterGraph graph_ctx);
extern "C" void __cdecl avfilter_graph_set_auto_convert(pAVFilterGraph graph, unsigned flags);
static const System::Int8 AVFILTER_AUTO_CONVERT_ALL = System::Int8(0x0);
static const System::Int8 AVFILTER_AUTO_CONVERT_NONE = System::Int8(-1);
extern "C" int __cdecl avfilter_graph_config(pAVFilterGraph graphctx, void * log_ctx);
extern "C" void __cdecl avfilter_graph_free(pAVFilterGraph &graph);
extern "C" pAVFilterInOut __cdecl avfilter_inout_alloc(void);
extern "C" void __cdecl avfilter_inout_free(pAVFilterInOut &inout);
extern "C" int __cdecl avfilter_graph_parse(pAVFilterGraph graph, const char * filters, pAVFilterInOut inputs, pAVFilterInOut outputs, void * log_ctx);
extern "C" int __cdecl avfilter_graph_parse_ptr(pAVFilterGraph graph, const char * filters, pAVFilterInOut &inputs, pAVFilterInOut &outputs, void * log_ctx);
extern "C" int __cdecl avfilter_graph_parse2(pAVFilterGraph graph, const char * filters, pAVFilterInOut &inputs, pAVFilterInOut &outputs);
extern "C" int __cdecl avfilter_graph_send_command(pAVFilterGraph graph, const char * target, const char * cmd, const char * arg, char * res, int res_len, int flags);
extern "C" int __cdecl avfilter_graph_queue_command(pAVFilterGraph graph, const char * target, const char * cmd, const char * arg, int flags, double ts);
extern "C" char * __cdecl avfilter_graph_dump(pAVFilterGraph graph, const char * options);
extern "C" int __cdecl avfilter_graph_request_oldest(pAVFilterGraph graph);
extern "C" int __cdecl av_buffersink_get_frame_flags(pAVFilterContext ctx, Libavutil::pAVFrame frame, int flags);
static const System::Int8 AV_BUFFERSINK_FLAG_PEEK = System::Int8(0x1);
static const System::Int8 AV_BUFFERSINK_FLAG_NO_REQUEST = System::Int8(0x2);
extern "C" pAVBufferSinkParams __cdecl av_buffersink_params_alloc(void);
extern "C" pAVABufferSinkParams __cdecl av_abuffersink_params_alloc(void);
extern "C" void __cdecl av_buffersink_set_frame_size(pAVFilterContext ctx, unsigned frame_size);
extern "C" Libavutil::AVMediaType __cdecl av_buffersink_get_type(const pAVFilterContext ctx);
extern "C" Libavutil::AVRational __cdecl av_buffersink_get_time_base(const pAVFilterContext ctx);
extern "C" int __cdecl av_buffersink_get_format(const pAVFilterContext ctx);
extern "C" Libavutil::AVRational __cdecl av_buffersink_get_frame_rate(const pAVFilterContext ctx);
extern "C" int __cdecl av_buffersink_get_w(const pAVFilterContext ctx);
extern "C" int __cdecl av_buffersink_get_h(const pAVFilterContext ctx);
extern "C" Libavutil::AVRational __cdecl av_buffersink_get_sample_aspect_ratio(const pAVFilterContext ctx);
extern "C" int __cdecl av_buffersink_get_channels(const pAVFilterContext ctx);
extern "C" unsigned __int64 __cdecl av_buffersink_get_channel_layout(const pAVFilterContext ctx);
extern "C" int __cdecl av_buffersink_get_sample_rate(const pAVFilterContext ctx);
extern "C" Libavutil::pAVBufferRef __cdecl av_buffersink_get_hw_frames_ctx(const pAVFilterContext ctx);
extern "C" int __cdecl av_buffersink_get_frame(pAVFilterContext ctx, Libavutil::pAVFrame frame);
extern "C" int __cdecl av_buffersink_get_samples(pAVFilterContext ctx, Libavutil::pAVFrame frame, int nb_samples);
static const System::Int8 AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = System::Int8(0x1);
static const System::Int8 AV_BUFFERSRC_FLAG_PUSH = System::Int8(0x4);
static const System::Int8 AV_BUFFERSRC_FLAG_KEEP_REF = System::Int8(0x8);
extern "C" unsigned __cdecl av_buffersrc_get_nb_failed_requests(pAVFilterContext buffer_src);
extern "C" pAVBufferSrcParameters __cdecl av_buffersrc_parameters_alloc(void);
extern "C" int __cdecl av_buffersrc_parameters_set(pAVFilterContext ctx, pAVBufferSrcParameters param);
extern "C" int __cdecl av_buffersrc_write_frame(pAVFilterContext ctx, const Libavutil::pAVFrame frame);
extern "C" int __cdecl av_buffersrc_add_frame(pAVFilterContext ctx, Libavutil::pAVFrame frame);
extern "C" int __cdecl av_buffersrc_add_frame_flags(pAVFilterContext buffer_src, Libavutil::pAVFrame frame, int flags);
extern "C" int __cdecl av_buffersrc_close(pAVFilterContext ctx, __int64 pts, unsigned flags);
}	/* namespace Libavfilter */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_LIBAVFILTER)
using namespace Libavfilter;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// LibavfilterHPP
